package com.qls.mt.biz.order.controller;

import com.alibaba.fastjson.JSONObject;
import com.qls.ali.api.AliRemoteService;
import com.qls.mt.biz.common.utils.MtResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


/**
 * @author Administrator
 */
@Slf4j
@RestController
public class TestController {


    @Autowired
    private AliRemoteService aliRemoteService;


    @PostMapping(value = "test")
    public MtResponse callback() {
        Map<String, Object> map = new HashMap<>();

        JSONObject jsonObject = new JSONObject();

        jsonObject.put("code", 0);
        jsonObject.put("buyOrderId", 123);
        System.out.println(aliRemoteService.callback(jsonObject));
        return MtResponse.ok();
    }


}
